Skip to content

🤖 fix: clear stale usage state when history is rewritten so the next send does not auto-compact - #3818

Open
ibetitsmike wants to merge 37 commits into
mainfrom
mike/fix-stale-usage-after-history-rewrite
Open

🤖 fix: clear stale usage state when history is rewritten so the next send does not auto-compact#3818
ibetitsmike wants to merge 37 commits into
mainfrom
mike/fix-stale-usage-after-history-rewrite

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the spurious /compact turn that occurred after Start Here and other context rewrites. The implementation clears the in-memory usage snapshot at rewrite boundaries and removes stale persisted usage only when a prefix truncation changes the active provider context.

Background

AgentSession caches the latest context usage for the on-send compaction check. Start Here appended a new compaction boundary without clearing that cache, so the next ordinary message could be replaced by an auto-compaction request based on usage from the old context.

The original fix grew to roughly 2,000 net added lines by moving provider policy and renderer callbacks into HistoryService, adding hidden usage-seeding state, and accumulating recovery and test scaffolding.

Implementation

  • Clear cached usage when Start Here, reset, clear, heartbeat reset, message editing, hard restart, or normal compaction rewrites provider context.
  • Keep history seeding enabled so completed boundary rewrites recover usage from the new active window.
  • Strip persisted contextUsage and contextProviderMetadata only when percentage truncation removes provider-visible rows from the active window.
  • Keep HistoryService focused on durable file mutation, without session or renderer callbacks.
  • Use a target-state transaction for archive-consuming rewrites. Dual hashes distinguish committed output from an interrupted rewrite, preserve the original archive as a rollback tombstone, recover legacy markerless tombstones, and serialize recovery with logical archive-plus-chat reads and fork snapshots.
  • Keep manual review refreshes on the uncached path until the requested file-tree and diff loads complete, preventing unrelated dependency reruns from consuming the refresh token early.
  • Replace timing-sensitive service-test assertions with the existing terminal-attention drain and direct stale-goal candidate checks.

The final diff is 1,135 additions and 491 deletions, net 644 lines. This is about 69 percent smaller than the original net 2,064-line version while retaining restart and partial-failure safety.

Validation

  • Red-green Start Here regression: removing cache invalidation makes the next send persist a compaction request.
  • Red-green prefix-truncation coverage for stale persisted usage and provider metadata.
  • Crash-recovery coverage for incomplete, committed, and legacy markerless archive tombstones.
  • Full HistoryService, SessionUsageService, TaskService, and WorkspaceGoalService suites.
  • Focused WorkspaceService Start Here and fork snapshot regressions.
  • Full tests/ui/review/refresh.test.ts, 10 tests.
  • make static-check.

Risks

Moderate. The cache reset is small and pessimistic. The durable-history changes affect percentage truncation and archived-message edits, with focused coverage for transaction recovery, boundary semantics, sequence counters, and restart-visible metadata. The review refresh change only delays marking a refresh token consumed until its corresponding non-cancelled load succeeds.


Generated with mux • Model: openai:gpt-5.6-sol • Thinking: xhigh

…oundary

Start Here (replaceHistory), /reset (resetContext), and /clear
(truncateHistory) rewrite history to a fresh context boundary but left the
session's in-memory lastUsageState from the previous stream intact. The next
sendMessage fed that stale high usage into the on-send compaction check and
synthesized a spurious /compact request against the already-cleared context.

Clear the session usage state in all three paths; the next send re-seeds
accurate usage from post-boundary history.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
Cleanup-gate follow-up: the same stale-usage defect class existed on the
heartbeat context reset, exec-subagent hard restart, and edit truncation
paths, plus two ordering gaps (destructive replaceHistory cleared history
before the summary append could fail, and zero-percentage truncation cleared
usage without rewriting anything). Route all context rewrites through
clearUsageState() and slim the new tests down to the repo's fake-session
wiring pattern.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: cfb05fb2a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…st bootstrap

CI-only failure on this PR: 35 AgentListItem/GitStatusIndicatorView/
TaskGroupListItem tests failed with "Cannot access 'DragPreviewImage' before
initialization". Changing test files shifts bun's CI discovery order, letting
a pre-existing order bug surface: files that tear down with
`globalThis.document = undefined` poison installDom()'s snapshot/restore,
which propagates a document-less environment (with baseline observers
present) to later files; @react-dnd/asap then crashes at module eval and
leaves react-dnd's internal exports in TDZ, so every later import including
`?real=1` re-evals fails.

Fix at the chokepoint in tests/ui/dom.ts: the uninstaller re-bootstraps a
baseline when it would restore a poisoned document, and react-dnd's module
graph is evaluated eagerly while the DOM is healthy so re-evals resolve
initialized internals. Both guards in tests/ui/domIsolation.test.ts fail
against their own toggle.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3e6dcd4cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/workspaceService.ts Outdated
tests/ui/domIsolation.test.ts uses bun:test (it guards bun's single-process
module cache behavior), so the Jest-based integration run fails to resolve
its import. Skip it via testPathIgnorePatterns like the storybook bun tests.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fadf52b1fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread jest.config.js Outdated
…ider usage

Codex P2: for a partial /clear, clearing the in-memory usage cache was
ineffective because the retained newest assistant row still carries
pre-truncation contextUsage and partial truncation appends no boundary, so
seedUsageStateFromHistory() restored the same stale value on the next send.

clearUsageState() now also suppresses history seeding until the provider
reports fresh usage (updateUsageStateFromModelUsage resets the flag). Guard
tests: a baseline proving the boundary-less fixture seeds, and a suppression
test that fails without the new guard.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37ced8cace

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/agentSession.ts Outdated
Codex P2: tests/ui/domIsolation.test.ts was excluded from Jest but no bun
target ran it, so the guards never executed in local validation or CI. Add
the file to the Makefile test-unit bun invocation and to the CI Unit job's
explicit file list.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: acc9f3d7b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/agentSession.ts
Codex P2: the in-memory seeding suppression does not survive an app restart.
After a partial /clear plus restart, seedUsageStateFromHistory() reloaded the
retained assistant row's pre-truncation contextUsage and could spuriously
auto-compact again.

Sanitize at the source: the partial-truncation rewrite now strips
contextUsage and contextProviderMetadata from retained rows, since those
snapshots measured a context that no longer exists. Restart-safe with no
extra persisted state; the in-memory suppression flag still covers the
same-process window until fresh provider usage arrives. Red-green verified
via a historyService test.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

Codex P2: queued user input rolls back an undispatched heartbeat reset
boundary and restores the pre-reset provider context, but the seeding
suppression from the boundary append stayed active, so the queued turn could
not recover the restored history's near-limit usage and skipped on-send
compaction. Re-enable seeding on successful rollback. Guard test drives the
real append -> queue -> rollback path and fails without the re-enable.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b25223c6c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/workspaceService.ts Outdated
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9dd1adc41

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/agentSession.ts Outdated
Codex P2: when a partial truncation committed but the monitor-wake
restoration step of clearHistoryWithRetiredBashMonitorWakes threw, the
invalidation after the wrapper never ran and the session kept its
pre-truncation usage. Move the clear into the truncate closure, immediately
after the successful rewrite. Guard test injects a wake-restore failure and
fails without the move.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

Codex P2: message edits truncate a suffix, so the retained prefix's persisted
contextUsage still describes the active context. Blanket seeding suppression
meant an edit whose stream failed before reporting usage left the next send
unable to recover that valid snapshot, bypassing on-send compaction for
near-limit prefixes. clearUsageState() gains a preserveHistorySeeding option
used by the edit path. Guard test drives edit-then-send and fails without it.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db716c50a6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/historyService.ts Outdated
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6704dbd2b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/agentSession.ts Outdated
…st boundary

Codex P2: after a compaction boundary exists, a 25/50/75% truncation can
remove only sealed pre-boundary rows, leaving the active provider context
unchanged; stripping retained contextUsage and suppressing the in-memory
seed then discarded a valid near-limit snapshot and could skip required
on-send compaction.

truncateHistory now reports whether the cut reached the active window
(removed the latest durable boundary or later rows). Rows are sanitized and
session usage cleared only in that case. Red-green: forcing the flag true
fails the new preserve test; the strip test still guards boundary-less cuts.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d1e3ebd0f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/historyService.ts Outdated
…leave renderer ghost rows

truncateHistory/clearHistory now take an onRowsDeleted callback fired
with each committed step's deleted sequences, even when a later step
fails. The three DeleteMessage emitters (truncateHistory, destructive
replaceHistory, exec hard-restart clear) emit accumulated committed
deletions on failure paths too, so rows already removed from disk
cannot linger in the renderer with sequences no retry can report.
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c9bb86a073

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/agentSession.ts Outdated
…tripping usage while the hazard exists

The copied prefix is written with usage snapshots stripped while the
archive still exists, so a failed or crashed archive removal leaves
nothing stale for a fresh session to seed. Once the removal commits the
hazard is gone, and a restore write brings the usage back because it is
exact for the restored prefix and an edited near-limit prefix must stay
monitored on the next send.
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 170a0d90f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/agentSession.ts Outdated
…after the rewrite

The edit-truncation commit callback now reports whether the retained
rows' persisted usage stays valid. Active-file suffix cuts create no
duplicated prefix, so seeding re-enables at commit and a near-limit
prefix stays monitored despite the Err; the archived branch keeps
suppression until full success.
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 2a5274d7f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

The implementation was substantially simplified after code review. Please review the current head ac9a32582, especially history rewrite crash states and persisted usage invalidation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac9a325823

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/historyService.ts Outdated
Comment thread src/node/services/historyService.ts Outdated
Comment thread src/node/services/historyService.ts Outdated
Comment thread src/node/services/historyService.ts Outdated
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the four findings on current head 1db6e9533:

  • archived-target edits keep the active file until the retained archive prefix is durable
  • active-context invalidation uses provider-eligible, workflow-filtered removed rows, including no-boundary history
  • normal rotated cuts avoid premature usage stripping
  • archive-consuming cuts use a recoverable tombstone so later failures restore disk state rather than committing partial deletions

Please review the current head.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1db6e95336

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/historyService.ts Outdated
Use target-state hashes to distinguish committed and interrupted archive rewrites, recover legacy tombstones, and serialize logical reads with recovery.

Generated with mux • Model: openai:gpt-5.6-sol • Thinking: xhigh

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

The interrupted archive truncation finding is fixed on f99fc2b4e. Recovery now verifies both target files, rolls back incomplete rewrites, preserves recovery state when rollback cannot finish, restores legacy markerless tombstones, and holds the workspace lock across recovery plus logical reads.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f99fc2b4ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/historyService.ts
Let usage rebuilds iterate history through the lock-held path so transaction recovery remains serialized without reacquiring the shared non-reentrant mutex.

Generated with mux • Model: openai:gpt-5.6-sol • Thinking: xhigh

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

The non-reentrant lock finding is fixed on 1722f48ab. Session usage rebuilds now use a lock-held HistoryService iterator that performs transaction recovery without reacquiring workspaceFileLocks. The full SessionUsageService and HistoryService suites and make static-check pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1722f48ab9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/historyService.ts
Recover pending archive transactions and capture chat plus sealed history atomically before writing the fork session files.

Generated with mux • Model: openai:gpt-5.6-sol • Thinking: xhigh

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh -->
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

The fork snapshot race is fixed on af4b86b58. Fork history is now captured through HistoryService after transaction recovery while holding the source workspace lock, then written to the target after releasing that lock. The HistoryService suite, focused fork test, and make static-check pass.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: af4b86b58b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

The latest push fixes the CI failures by keeping manual review refreshes uncached until their loads complete and making the two asynchronous service tests deterministic.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 61078d3c0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant